<?php
/**
 * 本档案用于测试PHP中的接口OOP
 *
 */
interface VideoCardInter {
	public function Display();
	public function __get($name);
}

class Dmeng implements VideoCardInter {
	/**
	 * @see VideoCardInter::Display()
	 *
	 */
	public function Display() {
		echo "Display.";
	}
	
	/**
	 * @see VideoCardInter::GetName()
	 *
	 */
	public function __get($name) {
		return "Dmeng VideoCard: ".$name;
	}
}

class Mainboard {
//	var $vc;
	function run(VideoCardInter $vc) {
		$this->vc=$vc;
		$this->vc->Display();
		
	}
}

//检测文件是否是UTF-8编码
function isUTF8($str) {
	if ($str === mb_convert_encoding(mb_convert_encoding($str, "UTF-32", "UTF-8"), "UTF-8", "UTF-32")) {
		return true;
	}else {
		return false;
	}
}


$str = 'Dmeng';
$computer = new Mainboard();
$computer->run(new $str);
?>

/**
 * 宋诗100首
 * song100
 */
class song100 implements Poem_Inter {
} //END class song100

/**
 * 宋词
 * songproses
 */
class songproses implements Poem_Inter {
} //END class songproses

